<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="scripts/jquery/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="scripts/buzzzzble-1.0.0.js"></script>
<link type="text/css" href="style/main.css" rel="stylesheet" />
<title>Buzzzzble</title>
<style type="text/css" src=""></style>
</head>
<body>
<h1>Buzzzzble</h1>
<p><a href="/OauthAuthorizationServlet">Getting Start Buzzzzble</a></p>
<p><a id="getAllBtn" href="#">Get All</a></p>
<p><input type="text" id="textApi"/>
	<input id="runBtn" type="button" value="RUN" />
	<input id="deleteBtn" type="button" value="DELETE" /></p>
<script type="text/javascript">
	$(document).ready(function(){
		$('#runBtn').click(function(){
			var apiobj = {
					buzzapi_type : 'POST',
					buzzapi_uri	: $('#textApi').val(),
					buzzapi_prettyprint : true,
					buzzapi_alt : 'json',
					buzzapi_postData : '{"data": {"object": {"type": "note","content": "buzz 测试测试！"}}}'
				};
			Buzzzzble.DAO.request(apiobj, {
				success : function(obj, code){
					alert(obj);
				}
			});
		});
		$('#deleteBtn').click(function(){
			var apiobj = {
					buzzapi_type : 'DELETE',
					buzzapi_uri	: $('#textApi').val()
				};
			Buzzzzble.DAO.request(apiobj,{
				success : function(obj, code){
					alert(code);
				}
			});
		});
	});
</script>
</body>
</html>
